package www.reagnetbox.com.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import www.reagnetbox.com.R;
import www.reagnetbox.com.bean.QueryListItem;
import www.reagnetbox.com.bean.RecentStockInListItem;

public class QueryListAdapter extends BaseQuickAdapter<QueryListItem, BaseViewHolder> {
    private BaseViewHolder viewHolder;
    private Context context;

    public QueryListAdapter(Context context, int resContentView, List<QueryListItem> data) {
        super(resContentView, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder viewHolder, QueryListItem item) {
        this.viewHolder = viewHolder;
        viewHolder
                .setText(R.id.tv_code, item.getCode())
                .setText(R.id.tv_operator, item.getOperator())
                .setText(R.id.tv_name, item.getName())
                .setText(R.id.tv_company, item.getCompany())
                .setText(R.id.tv_model, item.getModel())
                .setText(R.id.tv_num, item.getNum()+"")
                .setText(R.id.tv_in_time, item.getStockInTime())
                .setText(R.id.tv_invalid_time, item.getInvalidTime())
                .setText(R.id.tv_place, item.getPlace());

    }
}

